Skip to content

feat: add auto-commit functionality with customizable git commit args#21

Merged
fslongjin merged 4 commits intofslongjin:masterfrom
staryxchen:feat-add-auto-commit
Feb 24, 2026
Merged

feat: add auto-commit functionality with customizable git commit args#21
fslongjin merged 4 commits intofslongjin:masterfrom
staryxchen:feat-add-auto-commit

Conversation

@staryxchen
Copy link
Contributor

@staryxchen staryxchen commented Feb 18, 2026

Changes

  • Add --commit / -c CLI flag to automatically run git commit after generating the commit message
  • Add --commit-args CLI option to pass extra arguments to git commit (e.g. -s, --no-verify), supports hyphen-prefixed values
  • Add auto_commit and commit_args fields in config file for persistent defaults
  • CLI args take priority over config file settings
  • Auto-commit is supported in both default (commit message) and combined (branch + message) modes
  • Success/failure feedback is printed to stderr

Usage

# Generate and auto-commit
fastcommit -c

# Auto-commit with extra git args
fastcommit -c --commit-args "-s" --commit-args "--no-verify"

Config file (~/.fastcommit/config.toml):

auto_commit = true
commit_args = ["-s"]

Fastcommit is now truly “fast.”

- Add `--commit` and `--commit-args` CLI options
- Add `auto_commit` and `commit_args` config fields
- Execute `git commit` automatically after message generation

Signed-off-by: staryxchen <staryxchen@tencent.com>
- Update version in Cargo.toml and Cargo.lock
- Update installation version in README files

Signed-off-by: staryxchen <staryxchen@tencent.com>
- Add documentation for `-c, --commit` and `--commit-args` options
- Add usage examples for auto-commit functionality

Signed-off-by: staryxchen <staryxchen@tencent.com>
- Remove trailing comma in `commit_args` attribute definition

Signed-off-by: staryxchen <staryxchen@tencent.com>
@fslongjin fslongjin merged commit 13c506d into fslongjin:master Feb 24, 2026
@staryxchen staryxchen deleted the feat-add-auto-commit branch February 24, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants